 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Cache-control" content="max-age=0" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Pragma" content="no-cache" />
<title>添加信息</title>
<script type="text/javascript" src="easyui/jquery.min.js"></script>
<script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js" ></script>
<script type="text/javascript" src="js/loading.js"></script>
<script type="text/javascript" src="js/checkinFunction.js"></script>
<link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css" />
<link rel="stylesheet" rev="stylesheet" href="css/style.css" type="text/css" media="all" />
<style type="text/css">
<!--
body{
	overflow-y:auto;
}
.atten {
	font-size:12px;font-weight:normal;color:#F00;
}
div.fitem{
	padding-left: 20px;
	padding-top: 10px;
}
div.fitem label{
	width: 50px;
	font-size: 15px;
}
div.fitem input{
	margin-left: 10px;
}
#Monitor,#Director{
	font-weight:bold;
	color:orange;
}
div#audioBox,div#imageBox{
	margin-bottom: 3px;
}
div#audioBox a,div#imageBox a{
	margin:0 2px 0 2px;
}

div a:hover{
	color:red;
}
-->
</style>
</head>

<body>

<div >
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
  <tr >
      <th class="tablestyle_title" ><img src="images/icon_1.png" height="28" width="45"/>添加事件</th>
  </tr>
  <tr>
  	<td style="background-color:#ccc;line-height:20px;" id="tool">
  		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="saveEvent()">保存事件</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" plain="true" onclick="sendEmail()">发送邮件给报案人</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" plain="true" onclick="sendSMS()">发送短信给负责人</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" plain="true" onclick="uploadAudio()">上传录音</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" plain="true" onclick="uploadImage()">上传图片</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" plain="true" onclick="printEvent()">打印</a>
     </td>
  </tr>
  <tr>
    <td >
		<table border="0" cellpadding="0" cellspacing="0" style="width:100%;">
			<tr>
			<td width="100%">
				<table >
					<tr >
					<td>
						<fieldset style="height:100%;" >
							<legend>上传录音</legend>
							<div id="audioBox"></div>
							<form action="" id="audioForm" enctype="multipart/form-data" method="post">
							<input type="file" name="file" id="audioFile"/>
							<span id="uploadAudioLoading"></span>
							<input type="hidden" id="eventId2" name="eventId" value="" />
							</form>
						</fieldset>
					</td>
					<td>
						<fieldset style="height:100%;">
							<legend>上传图片</legend>
							<div id="imageBox"></div>
							<form action="" id="imageForm" enctype="multipart/form-data" method="post">
							<input type="file" name="file" id="imageFile"/>
							<span id="uploadImageLoading"></span>
							<input type="hidden" id="eventId3" name="eventId" value="" />
							</form>
						</fieldset>
					</td>
					</tr>
				</table>
				<fieldset style="height:100%;">
				<legend>添加事件[<font color="red"><span id="eventId1"></span></font>]</legend>
				<form id="eventForm" method="post">
					  <table border="0" cellpadding="2" cellspacing="0" style="width:100% ;height: 100%;">
					  <tr style="height: 25%">
					    <td align="right" width="25%" style="background-color:#ccc;" >
						 &nbsp; 报案人姓名:
					    <!--  <input name='reporterName' type="text"  value="" style="width:154px" class="easyui-validatebox" missingMessage="请输入姓名"  required="true"/> -->
					    <input name='reporterName'  style="height: 100% ;width: 60%"  type='text' class="easyui-validatebox textbox" data-options="required:true" missingMessage="请输入姓名"/>
					    </td>
					    <td align="right" width="25%" style="background-color:#ccc;">
					    &nbsp;报案人学号:
					    <!-- <input name='reporterId' type="text" value=""  style="width:154px" missingMessage="请输入学号" class="easyui-validatebox" required="true"/> -->
					    <input id='reporterId' name='reporterId' style="height: 100% ;width: 60%"  type='text' class="easyui-validatebox textbox" validType='length[12,12]' missingMessage='请输入学号' invalidMessage='请输入12位学号'  data-options="required:true" onkeyup="checkStuNum()"/>
						</td>
					    <td align="right" width="25%" style="background-color:#ccc;">
						&nbsp;报案人电话:
					   <!-- <input name='reporterPhoneNum' type="text" value="" style="width:154px" class="easyui-numberbox" required="true" /> -->
					  <input id='reporterPhoneNum' name='reporterPhoneNum' style="height: 100% ;width: 60%"  type='text' class="easyui-validatebox textbox" missingMessage='请输入手机号码' data-options="required:true" onkeyup="checkPhoneNum()"/>
					   </td>
					    <td align="right" width="25%" style="background-color:#ccc;">
						&nbsp;报案人邮箱:
					    <!-- <input name='reporterMail' type="text" value="" required="true" missingMessage="不能为空" invalidMessage="邮箱格式不正确" style="width:154px" class="easyui-validatebox" validType="email"/> -->
					    <input name='reporterMail' style="height: 100% ;width: 60%" class="easyui-validatebox textbox" data-options="prompt:'Enter a valid email.',required:true,validType:'email'" />
						</td>
					  </tr>
					   
					   <tr style="height: 25%">
					    <td align="right">
					 &nbsp;  报案人班级:
					    <select id="classRoom" name="reporterClass" style="width: 60%;height: 100%" class="easyui-validatebox" missingMessage="请选择专业" required="true">
					    		<option></option>
							</select>  
					   <!--  院 系 领 导:
					    <select name="select" style="width:154px" class="easyui-validatebox" missingMessage="请选择院系领导" required="true">
								<option  selected="selected"></option>
								<option>实习</option>
								<option>试用</option>
								<option>正式员工</option>
							</select> -->
					    </td>
					    <td align="right" width="25%" >
					 &nbsp;班  主  任:
					    <!--  <span><input name="reporterMonitorName" id="Monitor"   type="text" value=""   style="width:154px" readonly/></span>-->
					    <span><input name='reporterMonitorName' id="Monitor" style="height: 100% ;width: 60%"  type='text' class="easyui-validatebox textbox" readonly="readonly"/></span>
					   </td>
					    <td align="right" width="25%" >
					 &nbsp;辅 导 员:
					    <!-- <span><input name="reporterDirectorName" id="Director"   type="text" value=""   style="width:154px" readonly/></span>  -->
					    <span><input name="reporterDirectorName" id="Director" style="height: 100% ;width: 60%" type='text' class="easyui-validatebox textbox" readonly="readonly"/></span>
						</td>
					    <td align="right" width="25%" >
						 &nbsp;报 案 日 期
					    <input type="text" name="eventDate" id="nowDate" style="width: 60% ; height: 100%" readonly="readonly"/>
						</td>
					  </tr>

					  <tr style="height: 25%">
					    <td nowrap align="right" style="background-color:#ccc;">
					     &nbsp;事 件 类型:
					    <select name="eventType" style="width: 60%; height:100%" class="easyui-validatebox" required="true" missingMessage="请选择事件类型">
								<option></option>
								<option>求助</option>
								<option>学生事务</option>
								<option>教师事务</option>
								<option>行政事务</option>
								<option>后勤事务</option>
								<option>医疗案件</option>
								<option>刑事案件</option>
							</select>
					    </td>
					    <td align="right" width="25%" style="background-color:#ccc;">
					    &nbsp; 主 管 部 门:
					     <select id="department"  style="width: 60%; height:100%" class="easyui-validatebox" required="true" missingMessage="请选择主管部门" >
								<option  selected="selected"></option>
							</select>
					    </td>
					    <td align="right" width="25%" style="background-color:#ccc;">
					     &nbsp;部门领导:
					    <!--  <span><input id="username"  type="text" value="" style="width:154px" disabled="disabled"/></span> -->
					    <select id="username"  name="eventAdminBy" style="width: 60%; height:100%" class="easyui-validatebox" required="true" missingMessage="请选择部门领导" >
								<option  selected="selected"></option>
							</select>
					   </td>
					    <td align="right" width="25%" style="background-color:#ccc;">
					   &nbsp;手机号码:
					    <!--  <span><input id="phone"  type="text" value="" style="width:154px" disabled="disabled"/></span>-->
					    <span><input id="phone" style="height: 100% ;width: 60%" type='text' class="easyui-validatebox textbox" readonly="readonly"/></span>
						</td>
					  </tr>
					  
					  <table align="center">
					 <tr align="center">
					    <td nowrap align="center">
					    <textarea name="eventContent" id="mainContent" cols="100" rows="15" style="background: url('images/icon_1.png') no-repeat bottom right;resize:none;"class="easyui-validatebox" required="true" missingMessage="请输入内容" placeholder="请输入事件内容"></textarea>
					    </td>
					  </tr>
					  </table>
					   <input type="hidden" id="eventId" name="eventId" value="">
					  <input type="hidden" id="reporterDepartment" name="reporterDepartment" value="">
					  <input type="hidden" id="DirectorMail" name="mailAddr" value="">
					  <input type="hidden" id="username1" name="eventAdminByName" value="">
					  </table>
					  </form>
			  			<br/>
					</fieldset>
				</td>
			</tr>
		</table>
	 </td>
  </tr>
</table>

</div>

<div id="sendSMS" title="发短信给报案人" class="easyui-dialog" modal="true" style="width:400px;height:340px;padding:10px 20px"
            closed="true" buttons="#dlg-buttons">
	
        <form id="fm" method="post" novalidate>
        	<div class="fitem">
                <label>收信人姓名:</label>
                <input name="name" class="easyui-validatebox" required="required" missingMessage="请输入收信人姓名"/>
            </div>
            <div class="fitem">
                <label>收信人手机号:</label>
                <input name="addr" class="easyui-numberbox" required="required" missingMessage="请输入收信人电话号码" invalidMessage="只能为数字"/>
            </div>
            <div class="fitem">
                <textarea name="text" class="easyui-validatebox" missingMessage="简单扼要简述一下事件内容"  rows="14" cols="36" required="true" placeholder="建议70字以内"></textarea>
            </div>
        </form>
</div>

<div id="audioPlayer" title="录音播放" class="easyui-dialog" modal="false" style="width:30%;height:80px;text-aling:center;background-color: black;"
            closed="true">
            <div style="pading:25px;" id="statrAudio"></div>
</div>
<div id="dlg-buttons">
        <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok"  style="width:90px" onclick="doSendSMS()">发送</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#sendSMS').dialog('close')" style="width:90px">取消</a>
    </div>
</body>
</html>
